<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>缴存信息</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="../../../js/angular.js"></script>
<link rel="stylesheet" href="../../../layui/css/layui.css" media="all">
<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="../../../layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../../dwwsyyt/dw/gjjhbj/fy.js"></script>
<style>
         .layui-form-label{
         	 text-align: left;
             width:130px;
             height:30px;

     }
</style>
</head>
<body>
	<fieldset>
		<legend>个人缴存情况</legend>
	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline" >
				<label class="layui-form-label">姓名:</label>
				<div class="layui-input-inline">
					<input type="text" id="XINGMING" name="XINGMING" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label">证件号码:</label>
				<div class="layui-input-inline">
					<input type="text" id="ZJHM" name="email" id="ZJHM" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label">单位名称:</label>
				<div class="layui-input-inline">
					<input type="text" id="DWMC" name="DWMC" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label" >个人账户余额:</label>
				<div class="layui-input-inline">
					<input type="text" id="GRZHYE" name="GRZHYE" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline" >
				<label class="layui-form-label">个人账户状态:</label>
				<div class="layui-input-inline">
					<input type="text" id="GRZHZT" name="GRZHZT" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label">初缴年月:</label>
				<div class="layui-input-inline">
					<input type="text" id="CJNY" name="CJNY" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			
			<div class="layui-inline" >
				<label class="layui-form-label">开户日期:</label>
				<div class="layui-input-inline">
					<input type="text" id="KHRQ" name="KHRQ" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">最后缴交时间:</label>
				<div class="layui-input-inline">
					<input type="text" id="ZHJJSJ" name="ZHJJSJ" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form>
	</fieldset>
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
		});
	</script>
	<script type="text/javascript">
	
	function getPath() {  
	     
	        return 'http://'+location.host;
	}
		
		
	</script>
	<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../../layui/layer.ext.js"></script>
	<script type="text/javascript">

		$(function(){
			$.ajax({
				url : getPath()+'/wsyyt/jcjbqkcontroller/test',
				method : 'post',
				dataType : 'JSON',
				success : function(result) {
						
					var data = result.data;//这边的data属性是object
					if(result.code==0){
						$.each(data[0], function(key, value) {
							$("#" + key).val(value);
						});
					}else{
						layer.msg('提示：'+result.CW,{icon: 5});	
					}
				},
			});
		});
	</script>
	<script type="text/javascript">
	$(function(){
			$('input').attr("readonly","readonly");
		});
	</script>
	<fieldset>
		<legend>缴存历史记录</legend>
	<div ng-app="myApp" ng-controller="customersCtrl" align="center" >
		<div class="layui-inline" align="center">
	      <label class="layui-form-label" style="width: 80px">缴存年月:</label>
	      <div class="layui-input-inline">
	        <input class="layui-input" id="test8" placeholder="请选择年月" type="text" style="width: 260px">
	      </div>
	      <input ng-click="cx()" type="button" class="layui-btn layui-btn-primary" value="查&nbsp;&nbsp;&nbsp;&nbsp;询">
	    </div>
 		<div>
 		<loading>查询中请稍后</loading>
 		<table class="layui-table" style="width:90%" >
			<tr align="center" style="background-color:#f1f1f1">
				<td>缴交年月</td>
				<td>实际缴存日期</td>
				<td>缴存金额</td>
				<td>个人月缴存额</td>
				<td>单位月缴存额</td>
				<td>个人缴存比例</td>
				<td>单位缴存比例</td>
				<td>单位名称</td>
			</tr>
			<tr ng-repeat="x in names" align="center">
				
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.JJNY }}</td>
				<td ng-if="$even">{{ x.JJNY }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.SHRQ }}</td>
				<td ng-if="$even">{{ x.SHRQ }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.JCJE }}</td>
				<td ng-if="$even">{{ x.JCJE }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.GRYJCE }}</td>
				<td ng-if="$even">{{ x.GRYJCE }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DWYJCE }}</td>
				<td ng-if="$even">{{ x.DWYJCE }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.GRJCBL }}</td>
				<td ng-if="$even">{{ x.GRJCBL }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DWJCBL }}</td>
				<td ng-if="$even">{{ x.DWJCBL }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DWMC }}</td>
				<td ng-if="$even">{{ x.DWMC }}</td>
				
			 </tr>
			
		   </table>
		  </div>
		<div class="layui-btn-group">
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Sy()">首页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Previous()">上一页</button>
			<button ng-repeat="page in pageList" class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="selectPage(page)">{{ page }}</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Next()">下一页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Wy()">尾页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm "
				>{{selPage}}/{{pages}}</button>
		</div>
	</div>
</fieldset>
        	<script> 
        	var a;
			var app = angular.module('myApp', []);
			 app.directive('loading', function(){  
		        return {  
		            restrict: 'E',  
		            transclude: true,  
		            template: '<div ng-show="loading" class="loading" id="allDiv"  style="position:fixed; top:0px; left:0px; width:100%; height:100%; display:none; background-color:#000; opacity: 0.5; z-index:99999;">'  
		            +'<img alt="" src="../../../layui/img/jz.gif" style="vertical-align: middle;width:30px; height:30px; position: absolute; top:50%; left:50%; margin-top: -50px; margin-left:-50px;"/>'
		            +'</div>',  
		            link: function (scope, element, attr) {  
		                scope.$watch('loading', function (val) {  
		                    if (val){  
		                        document.getElementById("allDiv").style.display = "block";  
		                    }else{  
		                        document.getElementById("allDiv").style.display = 'none';  
		  
		                    }  
		                });  
		            }  
		        };
		    });  
			    app.controller('customersCtrl', function($scope, $http) {
			    $scope.setLoading =function(){  
				    if($scope.loading ==undefined || $scope.loading ==false){  
				        $scope.loading=true;  
				    }else{  
				        $scope.loading=false;  
				    };
				};
			    $scope.cx = function () {
			    	var rq=document.getElementById("test8").value;
			    	if(rq!="" && rq != null){
				   		$scope.setLoading();
		      			$scope.params={sj:document.getElementById("test8").value},
					$http({
						url:getPath() + "/wsyyt/jclsjlcontroller/test",
						method:'post',
						params:$scope.params
					}).then(
						function(res) {
							$scope.data = res.data.data;//自己打断点看格式:[{},{}]
							$scope.setLoading();
							if(res.data.code==1){
								$scope.names="";
								$scope.selPage="";
								$scope.selectPage="";
								$scope.pages="";
								$scope.page="";
								$scope.pageList="";
								layer.msg('提示：'+res.data.CW,{icon: 5});		
								return null;						
								}
								a = res.data.CNT;
								feny($scope.data);	
							});			
						}else{
								$scope.names="";
								$scope.selPage="";
								$scope.selectPage="";
								$scope.pages="";
								$scope.page="";
								$scope.pageList="";
								layer.alert("缴存年月不能是空！");
								return null;	
						}
					};
				});
				</script>
				<script>
				layui.use(['form', 'layedit', 'laydate'], function(){
				  var form = layui.form
				  ,layer = layui.layer
				  ,layedit = layui.layedit
				  ,laydate = layui.laydate;
				  laydate.render({
				    elem: '#test8'
				    ,type: 'month'
				    ,range: true
				  });
				});
				</script>
</body>
</html>
